home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / tuning / download / xteq / setup.exe / {app} / plugins / XQ W2K Startmenu Items 1.xpl < prev    next >
Text File  |  2001-05-04  |  3KB  |  81 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\Start menu\Visible Items"
  5. "NAME"="Visible Items #2"
  6. "VERSION"="1.30"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="000111"
  9. "TEXT 1"="Show "Recent Documents" in Start menu"
  10. "TEXT 2"="Show "Help" in Start menu"
  11. "TEXT 3"="Show "Run..." in Start menu"
  12. "TEXT 4"="Shiw "Logoff..." in Start menu"
  13. "DESCRIPTION 1"="Use this plug-in to show or hide some of the items in the Start menu of Windows 2000 (or Windows XP in classic Start Menu mode)."
  14. "DESCRIPTION 2"="IMPORTANT: The "Run..." option is only a visible setting, means even if this option is turned off, the user can still press WINDOWS+R to access the Run... dialog box!"
  15. "AUTHOR"="Xteq Systems (CptSiskoX)"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"="For more information, go to http://www.xteq.com"
  18. "COMMENT 2"="Thanks to SIMONORORKE for the LOGOFF option!"
  19.  
  20.  
  21. 'Declaration of some constants
  22. '0 = disable restriction, 1 = enable restriction, all reg_dword
  23. sP1="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSMMyDocs"
  24. sP2="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSMHelp"
  25. sP3="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\StartMenuRun" 'DW
  26. sP4="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\StartMenuLogoff" 'DW
  27.  
  28. 'Called when the Plugin is started
  29. SUB Plugin_Initialize 
  30.  If GetWinVer=4 or GetWinVer=5 or GetWinVer=6 then
  31.     i=RegReadValue(sP1) 'DW
  32.     if IsEmpty(i) or i=0 then SetUIElement 1,true
  33.  
  34.     i=RegReadValue(sP2) 'DW
  35.     if IsEmpty(i) or i=0 then SetUIElement 2,true 
  36.  
  37.     i=RegReadValue(sP3) 'DW
  38.     if IsEmpty(i) or i=1 then SetUIElement 3,true 
  39.  
  40.     i=RegReadValue(sP4) 'DW
  41.     if IsEmpty(i) or i=1 then SetUIElement 4,true 
  42.  
  43.  else 
  44.     Call Disable    
  45.  end if
  46. END SUB
  47.  
  48. 'Called when the Plugin should validate the Data the user has entered
  49. SUB Plugin_CheckData(ElementIndex)
  50. END SUB
  51.  
  52. 'Called when the Plugin should apply the changes
  53. SUB Plugin_Apply(ElementIndex,ElementSubIndex) 
  54.  Call WriteIt(1,sP1)
  55.  Call WriteIt(2,sP2)
  56.  Call WriteIt(3,sP3)
  57.  Call WriteIt(4,sP4)
  58. END SUB
  59.  
  60.  
  61. Sub WriteIt(ITM,PATH)
  62.   b=GetUIElement(ITM)
  63.   if b=true then
  64.      s=RegReadValue(PATH)
  65.      if IsEmpty(s)=false then
  66.         Call RegDeleteValue(Path)
  67.      end if
  68.   else
  69.     Call RegWriteValue(PATH,1,2)
  70.   end if
  71.  
  72.   Call Logoff
  73. End Sub
  74.  
  75.  
  76.  
  77.  
  78. 'Called when the Plugin is about to be removed from memory
  79. SUB Plugin_Terminate
  80. END SUB
  81.